package com.dragon.modules.yuegou.entity.wallet;

import com.baomidou.mybatisplus.annotation.TableName;
import com.dragon.modules.yuegou.enums.TradeStatus;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 会员到商户的微信交易（会员向商户支付）实体类<br>
 * 对应的表为：walt_mem2mer_wechat_trade<br>
 * 
 * @author pbuilder generated
 * @date 2019-06-03 15:20:36
 * @company sgy
 * @version 2.0
 */
@TableName("walt_mem2mer_wechat_trade")
@ApiModel(description = "会员到商户的微信交易（会员向商户支付）")
public class Mem2merWechatTradeEntity {

    /**  */
	protected String id;

    /** 会员ID（冗余） */
	@ApiModelProperty("会员ID（冗余）")
	protected String memberId;

    /** 会员钱包ID */
	@ApiModelProperty("会员钱包ID")
	protected String memberWalletId;

    /** 商户ID（冗余） */
	@ApiModelProperty("商户ID（冗余）")
	protected String merchantId;

    /** 商户钱包ID */
	@ApiModelProperty("商户钱包ID")
	protected String merchantWalletId;

    /** 订单号 */
	@ApiModelProperty("订单号")
	protected String orderNo;

    /** 交易微信金额 */
	@ApiModelProperty("交易微信金额")
	protected BigDecimal amount;

    /** 交易前会员微信余额 */
	@ApiModelProperty("交易前会员微信余额")
	protected BigDecimal memberAmountBefore;

    /** 交易后会员微信余额 */
	@ApiModelProperty("交易后会员微信余额")
	protected BigDecimal memberAmountAfter;

    /** 交易前商户微信余额 */
	@ApiModelProperty("交易前商户微信余额")
	protected BigDecimal merchantAmountBefore;

    /** 交易后商户微信余额 */
	@ApiModelProperty("交易后商户微信余额")
	protected BigDecimal merchantAmountAfter;

    /** 确认交易前商户可提现微信余额（确认交易时设值） */
	@ApiModelProperty("确认交易前商户可提现微信余额（确认交易时设值）")
	protected BigDecimal merchantWithdrawableAmountBefore;

    /** 确认交易后商户可提现微信余额（确认交易时设值） */
	@ApiModelProperty("确认交易后商户可提现微信余额（确认交易时设值）")
	protected BigDecimal merchantWithdrawableAmountAfter;

    /** [全局枚举]交易状态：0-会员支出-MEMBER_OUT、1-商户入账-MERCHANT_IN、2-交易确认(进入商户可提现账户)-CONFIRMED、3-中止交易(退款)-STOPPED */
	@ApiModelProperty("[全局枚举]交易状态：0-会员支出-MEMBER_OUT、1-商户入账-MERCHANT_IN、2-交易确认(进入商户可提现账户)-CONFIRMED、3-中止交易(退款)-STOPPED")
	protected TradeStatus tradeStatus;

    /** 交易时间 */
	@ApiModelProperty("交易时间")
	protected LocalDateTime createdTime;

    /** 入账时间 */
	@ApiModelProperty("入账时间")
	protected LocalDateTime incomeTime;

    /** 确认时间 */
	@ApiModelProperty("确认时间")
	protected LocalDateTime confirmedTime;

    /** 中止时间 */
	@ApiModelProperty("中止时间")
	protected LocalDateTime stoppedTime;

	/**
	 * 构造一个空会员到商户的微信交易（会员向商户支付）实体对象
	 */
	public Mem2merWechatTradeEntity(){
		super();
	}

	/**
	 * 依据其它对象的信息构造一个会员到商户的微信交易（会员向商户支付）实体对象
	 * 
	 * @param other 其它对象
	 */
	public Mem2merWechatTradeEntity(Mem2merWechatTradeEntity other){
		super();
     	this.id = other.id;
     	this.memberId = other.memberId;
     	this.memberWalletId = other.memberWalletId;
     	this.merchantId = other.merchantId;
     	this.merchantWalletId = other.merchantWalletId;
     	this.orderNo = other.orderNo;
     	this.amount = other.amount;
     	this.memberAmountBefore = other.memberAmountBefore;
     	this.memberAmountAfter = other.memberAmountAfter;
     	this.merchantAmountBefore = other.merchantAmountBefore;
     	this.merchantAmountAfter = other.merchantAmountAfter;
     	this.merchantWithdrawableAmountBefore = other.merchantWithdrawableAmountBefore;
     	this.merchantWithdrawableAmountAfter = other.merchantWithdrawableAmountAfter;
     	this.tradeStatus = other.tradeStatus;
     	this.createdTime = other.createdTime;
     	this.incomeTime = other.incomeTime;
     	this.confirmedTime = other.confirmedTime;
     	this.stoppedTime = other.stoppedTime;
	}


	/**
	 * 获取
	 * 
	 * @return id 
	 */
	public String getId() {
		return id;
	}
  	
	/**
	 * 设置
	 * 
	 * @param id 
	 */
	public void setId(String id) {
		this.id = id;
	}

	/**
	 * 获取会员ID（冗余）
	 * 
	 * @return memberId 会员ID（冗余）
	 */
	public String getMemberId() {
		return memberId;
	}
  	
	/**
	 * 设置会员ID（冗余）
	 * 
	 * @param memberId 会员ID（冗余）
	 */
	public void setMemberId(String memberId) {
		this.memberId = memberId;
	}

	/**
	 * 获取会员钱包ID
	 * 
	 * @return memberWalletId 会员钱包ID
	 */
	public String getMemberWalletId() {
		return memberWalletId;
	}
  	
	/**
	 * 设置会员钱包ID
	 * 
	 * @param memberWalletId 会员钱包ID
	 */
	public void setMemberWalletId(String memberWalletId) {
		this.memberWalletId = memberWalletId;
	}

	/**
	 * 获取商户ID（冗余）
	 * 
	 * @return merchantId 商户ID（冗余）
	 */
	public String getMerchantId() {
		return merchantId;
	}
  	
	/**
	 * 设置商户ID（冗余）
	 * 
	 * @param merchantId 商户ID（冗余）
	 */
	public void setMerchantId(String merchantId) {
		this.merchantId = merchantId;
	}

	/**
	 * 获取商户钱包ID
	 * 
	 * @return merchantWalletId 商户钱包ID
	 */
	public String getMerchantWalletId() {
		return merchantWalletId;
	}
  	
	/**
	 * 设置商户钱包ID
	 * 
	 * @param merchantWalletId 商户钱包ID
	 */
	public void setMerchantWalletId(String merchantWalletId) {
		this.merchantWalletId = merchantWalletId;
	}

	/**
	 * 获取订单号
	 * 
	 * @return orderNo 订单号
	 */
	public String getOrderNo() {
		return orderNo;
	}
  	
	/**
	 * 设置订单号
	 * 
	 * @param orderNo 订单号
	 */
	public void setOrderNo(String orderNo) {
		this.orderNo = orderNo;
	}

	/**
	 * 获取交易微信金额
	 * 
	 * @return amount 交易微信金额
	 */
	public BigDecimal getAmount() {
		return amount;
	}
  	
	/**
	 * 设置交易微信金额
	 * 
	 * @param amount 交易微信金额
	 */
	public void setAmount(BigDecimal amount) {
		this.amount = amount;
	}

	/**
	 * 获取交易前会员微信余额
	 * 
	 * @return memberAmountBefore 交易前会员微信余额
	 */
	public BigDecimal getMemberAmountBefore() {
		return memberAmountBefore;
	}
  	
	/**
	 * 设置交易前会员微信余额
	 * 
	 * @param memberAmountBefore 交易前会员微信余额
	 */
	public void setMemberAmountBefore(BigDecimal memberAmountBefore) {
		this.memberAmountBefore = memberAmountBefore;
	}

	/**
	 * 获取交易后会员微信余额
	 * 
	 * @return memberAmountAfter 交易后会员微信余额
	 */
	public BigDecimal getMemberAmountAfter() {
		return memberAmountAfter;
	}
  	
	/**
	 * 设置交易后会员微信余额
	 * 
	 * @param memberAmountAfter 交易后会员微信余额
	 */
	public void setMemberAmountAfter(BigDecimal memberAmountAfter) {
		this.memberAmountAfter = memberAmountAfter;
	}

	/**
	 * 获取交易前商户微信余额
	 * 
	 * @return merchantAmountBefore 交易前商户微信余额
	 */
	public BigDecimal getMerchantAmountBefore() {
		return merchantAmountBefore;
	}
  	
	/**
	 * 设置交易前商户微信余额
	 * 
	 * @param merchantAmountBefore 交易前商户微信余额
	 */
	public void setMerchantAmountBefore(BigDecimal merchantAmountBefore) {
		this.merchantAmountBefore = merchantAmountBefore;
	}

	/**
	 * 获取交易后商户微信余额
	 * 
	 * @return merchantAmountAfter 交易后商户微信余额
	 */
	public BigDecimal getMerchantAmountAfter() {
		return merchantAmountAfter;
	}
  	
	/**
	 * 设置交易后商户微信余额
	 * 
	 * @param merchantAmountAfter 交易后商户微信余额
	 */
	public void setMerchantAmountAfter(BigDecimal merchantAmountAfter) {
		this.merchantAmountAfter = merchantAmountAfter;
	}

	/**
	 * 获取确认交易前商户可提现微信余额（确认交易时设值）
	 * 
	 * @return merchantWithdrawableAmountBefore 确认交易前商户可提现微信余额（确认交易时设值）
	 */
	public BigDecimal getMerchantWithdrawableAmountBefore() {
		return merchantWithdrawableAmountBefore;
	}
  	
	/**
	 * 设置确认交易前商户可提现微信余额（确认交易时设值）
	 * 
	 * @param merchantWithdrawableAmountBefore 确认交易前商户可提现微信余额（确认交易时设值）
	 */
	public void setMerchantWithdrawableAmountBefore(BigDecimal merchantWithdrawableAmountBefore) {
		this.merchantWithdrawableAmountBefore = merchantWithdrawableAmountBefore;
	}

	/**
	 * 获取确认交易后商户可提现微信余额（确认交易时设值）
	 * 
	 * @return merchantWithdrawableAmountAfter 确认交易后商户可提现微信余额（确认交易时设值）
	 */
	public BigDecimal getMerchantWithdrawableAmountAfter() {
		return merchantWithdrawableAmountAfter;
	}
  	
	/**
	 * 设置确认交易后商户可提现微信余额（确认交易时设值）
	 * 
	 * @param merchantWithdrawableAmountAfter 确认交易后商户可提现微信余额（确认交易时设值）
	 */
	public void setMerchantWithdrawableAmountAfter(BigDecimal merchantWithdrawableAmountAfter) {
		this.merchantWithdrawableAmountAfter = merchantWithdrawableAmountAfter;
	}

	/**
	 * 获取[全局枚举]交易状态：0-会员支出-MEMBER_OUT、1-商户入账-MERCHANT_IN、2-交易确认(进入商户可提现账户)-CONFIRMED、3-中止交易(退款)-STOPPED
	 * 
	 * @return tradeStatus [全局枚举]交易状态：0-会员支出-MEMBER_OUT、1-商户入账-MERCHANT_IN、2-交易确认(进入商户可提现账户)-CONFIRMED、3-中止交易(退款)-STOPPED
	 */
	public TradeStatus getTradeStatus() {
		return tradeStatus;
	}
  	
	/**
	 * 设置[全局枚举]交易状态：0-会员支出-MEMBER_OUT、1-商户入账-MERCHANT_IN、2-交易确认(进入商户可提现账户)-CONFIRMED、3-中止交易(退款)-STOPPED
	 * 
	 * @param tradeStatus [全局枚举]交易状态：0-会员支出-MEMBER_OUT、1-商户入账-MERCHANT_IN、2-交易确认(进入商户可提现账户)-CONFIRMED、3-中止交易(退款)-STOPPED
	 */
	public void setTradeStatus(TradeStatus tradeStatus) {
		this.tradeStatus = tradeStatus;
	}

	/**
	 * 获取交易时间
	 * 
	 * @return createdTime 交易时间
	 */
	public LocalDateTime getCreatedTime() {
		return createdTime;
	}
  	
	/**
	 * 设置交易时间
	 * 
	 * @param createdTime 交易时间
	 */
	public void setCreatedTime(LocalDateTime createdTime) {
		this.createdTime = createdTime;
	}

	/**
	 * 获取入账时间
	 * 
	 * @return incomeTime 入账时间
	 */
	public LocalDateTime getIncomeTime() {
		return incomeTime;
	}
  	
	/**
	 * 设置入账时间
	 * 
	 * @param incomeTime 入账时间
	 */
	public void setIncomeTime(LocalDateTime incomeTime) {
		this.incomeTime = incomeTime;
	}

	/**
	 * 获取确认时间
	 * 
	 * @return confirmedTime 确认时间
	 */
	public LocalDateTime getConfirmedTime() {
		return confirmedTime;
	}
  	
	/**
	 * 设置确认时间
	 * 
	 * @param confirmedTime 确认时间
	 */
	public void setConfirmedTime(LocalDateTime confirmedTime) {
		this.confirmedTime = confirmedTime;
	}

	/**
	 * 获取中止时间
	 * 
	 * @return stoppedTime 中止时间
	 */
	public LocalDateTime getStoppedTime() {
		return stoppedTime;
	}
  	
	/**
	 * 设置中止时间
	 * 
	 * @param stoppedTime 中止时间
	 */
	public void setStoppedTime(LocalDateTime stoppedTime) {
		this.stoppedTime = stoppedTime;
	}

    public String toString() {
		return new StringBuilder().append("Mem2merWechatTradeEntity{").
			append("id=").append(id).
			append(",memberId=").append(memberId).
			append(",memberWalletId=").append(memberWalletId).
			append(",merchantId=").append(merchantId).
			append(",merchantWalletId=").append(merchantWalletId).
			append(",orderNo=").append(orderNo).
			append(",amount=").append(amount).
			append(",memberAmountBefore=").append(memberAmountBefore).
			append(",memberAmountAfter=").append(memberAmountAfter).
			append(",merchantAmountBefore=").append(merchantAmountBefore).
			append(",merchantAmountAfter=").append(merchantAmountAfter).
			append(",merchantWithdrawableAmountBefore=").append(merchantWithdrawableAmountBefore).
			append(",merchantWithdrawableAmountAfter=").append(merchantWithdrawableAmountAfter).
			append(",tradeStatus=").append(tradeStatus).
			append(",createdTime=").append(createdTime).
			append(",incomeTime=").append(incomeTime).
			append(",confirmedTime=").append(confirmedTime).
			append(",stoppedTime=").append(stoppedTime).
			append('}').toString();
    }

	/**
	 * 复制对象
	 * 
	 * @return 复制后的新实体对象
	 */
	public Mem2merWechatTradeEntity copy() {
		return new Mem2merWechatTradeEntity(this);
	}

    /**  */
	public static final String COL_ID = "id";

    /** 会员ID（冗余） */
	public static final String COL_MEMBER_ID = "member_id";

    /** 会员钱包ID */
	public static final String COL_MEMBER_WALLET_ID = "member_wallet_id";

    /** 商户ID（冗余） */
	public static final String COL_MERCHANT_ID = "merchant_id";

    /** 商户钱包ID */
	public static final String COL_MERCHANT_WALLET_ID = "merchant_wallet_id";

    /** 订单号 */
	public static final String COL_ORDER_NO = "order_no";

    /** 交易微信金额 */
	public static final String COL_AMOUNT = "amount";

    /** 交易前会员微信余额 */
	public static final String COL_MEMBER_AMOUNT_BEFORE = "member_amount_before";

    /** 交易后会员微信余额 */
	public static final String COL_MEMBER_AMOUNT_AFTER = "member_amount_after";

    /** 交易前商户微信余额 */
	public static final String COL_MERCHANT_AMOUNT_BEFORE = "merchant_amount_before";

    /** 交易后商户微信余额 */
	public static final String COL_MERCHANT_AMOUNT_AFTER = "merchant_amount_after";

    /** 确认交易前商户可提现微信余额（确认交易时设值） */
	public static final String COL_MERCHANT_WITHDRAWABLE_AMOUNT_BEFORE = "merchant_withdrawable_amount_before";

    /** 确认交易后商户可提现微信余额（确认交易时设值） */
	public static final String COL_MERCHANT_WITHDRAWABLE_AMOUNT_AFTER = "merchant_withdrawable_amount_after";

    /** [全局枚举]交易状态：0-会员支出-MEMBER_OUT、1-商户入账-MERCHANT_IN、2-交易确认(进入商户可提现账户)-CONFIRMED、3-中止交易(退款)-STOPPED */
	public static final String COL_TRADE_STATUS = "trade_status";

    /** 交易时间 */
	public static final String COL_CREATED_TIME = "created_time";

    /** 入账时间 */
	public static final String COL_INCOME_TIME = "income_time";

    /** 确认时间 */
	public static final String COL_CONFIRMED_TIME = "confirmed_time";

    /** 中止时间 */
	public static final String COL_STOPPED_TIME = "stopped_time";
}
